<!DOCTYPE html>
<html lang="">
  <head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
    <link rel="icon" href="<%= BASE_URL %>favicon.ico" />
    <title><%= htmlWebpackPlugin.options.title %></title>
    <style>
      * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
      }
      html {
        font-size: 10px;
      }
    </style>
  </head>
  <body>
    <noscript>
      <strong
        >We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
        properly without JavaScript enabled. Please enable it to
        continue.</strong
      >
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
  </body>
  <script>
    //自适应
    (function () {
      function changSize() {
        //1、获取到当前窗口宽度
        let winW = window.innerWidth;
        //2、去计算跟标签大小
        let size = (winW * 10) / 1920;
        //3、直接设置html标签的font-size
        document.getElementsByTagName("html")[0].style.fontSize = size + "px";
      }
      changSize();
      window.onresize = changSize;
    })();
  </script>
</html>
